<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Test extends CI_Controller {

	public $data = array();

	function __construct()
	{
		parent::__construct();

		//if( !$this->session->userdata('logged_in') )
			//redirect('login');

		$this->load->model('merchant_model');
		$this->load->config('regions');
	}

	function index()
	{

		$this->load->library('pagination');

		$offset = $this->uri->segment(2, 0);
		$limit = 2;
		
		$this->data = $this->merchant_model->get_all(array(), $limit, $offset);

		$config['base_url'] = site_url('merchants');
		$config['total_rows'] = $this->data['count'];
		$config['per_page'] = $limit; 

		$this->pagination->initialize($config);

		$this->layout->view('merchants/list', $this->data);
		
	}

	
	function test_curl()
	{
		
		
		
		
		
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
